Common
These modifiers allow you to customize how rows and sections behave and appear inside a <List> component.
Applies To:
- Individual rows (e.g.,
<Text>,<HStack>, etc. inside<List>) - Entire sections (e.g.,
<Section>) - Or directly on the
<List>component itself
listItemTint
Sets the tint color applied to the row or its accessories (e.g., icons, buttons).
Type
Description
- Use this to override the inherited tint color for a row or its content.
- Use
nullto avoid overriding the inherited tint.
Example
listRowInsets
Applies padding (insets) to a row in a list.
Type
Description
- Use a single
numberto apply uniform padding. - Use an
EdgeInsetsobject to apply individual insets for top, bottom, leading, and trailing.
Example
listRowSpacing
Controls the vertical spacing between adjacent rows.
Type
Example
listRowSeparator
Sets the visibility of the separator line for a specific row.
Type
Visibility options:
"visible"– Always show the separator"hidden"– Hide the separator"automatic"– System default behavior
VerticalEdgeSet options:
"top"|"bottom"|"all"
Example
listRowSeparatorTint
Sets the tint color of the separator for a specific row.
Type
Example
listRowBackground
Places a custom background behind a list row.
Type
Example
listSectionSpacing
Controls the spacing between adjacent list sections.
Type
ListSectionSpacing options:
"default"– System default spacing"compact"– Smaller spacing- A
number– Custom spacing in points
Example
listSectionSeparator
Controls the visibility of the separator between list sections.
Type
Example
listSectionSeparatorTint
Sets the separator tint color for a section.
Type
Example
Supporting Types
EdgeInsets
Visibility
VerticalEdgeSet
Color formats
You can define color in three ways:
- Named keyword:
"green","label", etc. - Hex:
"#ff0000" - RGBA:
"rgba(255,0,0,1)"
